﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Common;
using ExpenseSystem.Common.BaseModel;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Model;
using ExpenseSystem.Core.DataAddOn;
using System.Web;

namespace ExpenseSystem.Core.DepartmentModules
{
    public abstract class DepartmentManager : INormalManager<DepartmentModel>
    {
        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected DepartmentManager() { }
        public static DepartmentManager CreateInstance()
        {
            return new DepartmentBaseManager();
        }

        protected NormalDataUpdater<DepartmentModel> updater = new DepartmentUpdaterRegister().GetDepartmentUpdater();
        public abstract bool Delete(DepartmentModel department,  out string message);
        public abstract bool Save(DepartmentModel department,  out string message, params IAddable<DepartmentModel>[] addables);
        public abstract bool DeleteById(long[] userId, out string message);

    }
}
